//
//  NoTripDataView.m
//  carcareIOS
//
//  Created by tianxing on 16/2/29.
//  Copyright © 2016年 baozun. All rights reserved.
//

#import "NoTripDataView.h"
@interface NoTripDataView()

@property (nonatomic , strong) UILabel *noTripLabel;

@end

@implementation NoTripDataView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self setUpView];
    }
    return self;
}

- (void)setUpView{
    
    // 无行程的图片
    UIImage * noDataImage = ImageNamed(@"wayNoDataIcon");
    UIImageView * noDataImageV = [[UIImageView imageViewWithFrame:CGRectMake(0, 0, noDataImage.size.width * __MAIN_RATIO_375, noDataImage.size.height * __MAIN_RATIO_375) image:noDataImage] setupOnView:self];
    [noDataImageV setCenter:CGPointMake(self.center.x, self.center.y - 70 * __MAIN_RATIO_H_667)];
//   [Factory imageViewWithCenter:CGPointMake(self.center.x, self.center.y - 70 * __MAIN_RATIO_H_667) image:ImageNamed(@"wayNoDataIcon") onView:self];
   self.noTripLabel= [Factory labelWithFrame:CGRectMake(0, 0, 200 * __MAIN_RATIO_375, 20 * __MAIN_RATIO_H_667) font:FONT_DEFAULT_Light(18) text:@"正在加载..." textColor:COLOR_HEXSTRING(@"949494") onView:self textAlignment:NSTextAlignmentCenter];
    self.noTripLabel.center = CGPointMake(self.center.x, noDataImageV.bottom + 40);
    self.noTripLabel.alpha = 0.6;
    
    
}
- (void)changeContentText:(NSString *)contentText
{
    if([contentText isNotNil])[self.noTripLabel setText:contentText];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
